/**
 * Bill.java
 * com.jamin.aabill.data
 *
 * Function： TODO 
 *
 *   ver     date      		author
 * ──────────────────────────────────
 *   		 2012-9-3 		wangjieming
 *
 * Copyright (c) 2012, TNT All Rights Reserved.
*/

package com.jamin.aabill.data;

import android.database.Cursor;

import com.jamin.aabill.db.BillTableMetaData;
import com.jamin.aabill.ui.AABillApplication;


/**
 * ClassName:Bill
 *
 * @author   wangjieming
 * @version  1.0
 * @since    v1.0
 * @Date	 2012-9-3 下午9:00:44 
 */
public class Bill {

	
	public Bill(Cursor cur){
		setBILL_ID(cur.getLong(cur.getColumnIndex(BillTableMetaData._ID)));
		setPROJECT(cur.getString(cur.getColumnIndex(BillTableMetaData.PROJECT)));
		setDESCRIPTION(cur.getString(cur.getColumnIndex(BillTableMetaData.DESCRIPTION)));
		setCREATE_AT(cur.getLong(cur.getColumnIndex(BillTableMetaData.CREATE_AT)));
		setMODIFY_AT(cur.getLong(cur.getColumnIndex(BillTableMetaData.MODIFY_AT)));
		setCOST(AABillApplication.mBillManager.getBillTotalCost(cur.getLong(cur.getColumnIndex(BillTableMetaData._ID))));
	}
	
	
	public Bill(long circleId , String project , int type , String description ,long modifyAt , long createAt){
		setCIRCLE_ID(circleId);
		setPROJECT(project);
		setTYPE(type);
		setDESCRIPTION(description);
		setMODIFY_AT(modifyAt);
		setCREATE_AT(createAt);
	}
	
	
	long BILL_ID;					//账单Id
	long CIRCLE_ID ;				//圈子ID
	long CREATOR_MEMBER_ID;			//创建者ID(单机版暂时省略)
	String PROJECT;					//账单名称
	int TYPE;						//账单消费类型
	String DESCRIPTION;				//账单描述
	long MODIFY_AT;					//修改时间
	long CREATE_AT;					//创建时间
	double COST;					//花费
	
	
	public long getBILL_ID() {
		return BILL_ID;
	}
	public void setBILL_ID(long bILL_ID) {
		BILL_ID = bILL_ID;
	}
	public long getCIRCLE_ID() {
		return CIRCLE_ID;
	}
	public void setCIRCLE_ID(long cIRCLE_ID) {
		CIRCLE_ID = cIRCLE_ID;
	}
	public long getCREATOR_MEMBER_ID() {
		return CREATOR_MEMBER_ID;
	}
	public void setCREATOR_MEMBER_ID(long cREATOR_MEMBER_ID) {
		CREATOR_MEMBER_ID = cREATOR_MEMBER_ID;
	}
	public String getPROJECT() {
		return PROJECT;
	}
	public void setPROJECT(String pROJECT) {
		PROJECT = pROJECT;
	}
	public int getTYPE() {
		return TYPE;
	}
	public void setTYPE(int tYPE) {
		TYPE = tYPE;
	}
	public String getDESCRIPTION() {
		return DESCRIPTION;
	}
	public void setDESCRIPTION(String dESCRIPTION) {
		DESCRIPTION = dESCRIPTION;
	}
	public long getMODIFY_AT() {
		return MODIFY_AT;
	}
	public void setMODIFY_AT(long mODIFY_AT) {
		MODIFY_AT = mODIFY_AT;
	}
	public long getCREATE_AT() {
		return CREATE_AT;
	}
	public void setCREATE_AT(long cREATE_AT) {
		CREATE_AT = cREATE_AT;
	}
	public double getCOST() {
		return COST;
	}
	public void setCOST(double cOST) {
		COST = cOST;
	}

	
	
	
}

